
#include <stdio.h>
#include "linked-queue.h"

LnkQueue MyQueue;

int main(int argc,char **argv){
    ElemType Tmp;
    InitQueue(&MyQueue);
    for (int i = 0; i < 5; ++i) {
        scanf("%d",&Tmp);
        if (EnQueue(&MyQueue,Tmp)) break;
    }


    printf("The length of queue is %d.\n",QueueLength(MyQueue));

    for (;;){
        if (DeQueue(&MyQueue,&Tmp)) break;
        printf("%d ",Tmp);
    }

    putchar('\n');

    printf("The length of queue is %d.\n",QueueLength(MyQueue));

    DestroyQueue(&MyQueue);
    return(0);
}